package graph.chart.point.decorator;

import graph.Point;

import java.awt.Color;
import java.awt.Graphics2D;


/**
 * Decorates a point on the chart with a a solid filled circle with a custom color.
 * @author malpka
 *
 */
public class SolidCirclePointDecorator extends PointDecorator{
	
	int radius = 5;
	Color color = Color.BLACK;
	
	public SolidCirclePointDecorator(Color color, int radius){
		this.color = color;
		this.radius = radius;
	}
	
	@Override
	public void decorate(Graphics2D g2D, Point point){
		g2D.setColor(color);
		g2D.fillOval((int)(point.getX() - radius), (int)(point.getY() - radius), 2 * radius, 2*radius);
	}
}
